#!/bin/bash
#Install fastDFS on centos-7
#Write by @haipenge
#Date:2018.08.14
#Under docker
#Got Base Docker with jdk1.8,write by haipenge
#docker pull haipenge/centos-7-java
yum -y install make cmake gcc gcc-c++
yum -y install git
libevent_version='2.1.8'
fastdfs_version=''
wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-$libevent_version-stable.tar.gz .
tar -zxvf libevent-$libevent_version-stable.tar.gz
yum –y remove libevent
cd libevent-$libevent_version-stable
./configure –prefix=/usr
make 
make install
cd .. 
git clone https://github.com/happyfish100/fastdfs.git
cd fastdfs
sh make.sh
sh make.sh install